<!DOCTYPE html >
<html>

	<head>
		<meta charset="UTF-8">

		<title>热门团购</title>
		<meta name="Keywords" content="热门团购" />
		<meta name="Description" content="热门团购" />
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet" href="__TMPL__Public/css/common.css" />
		<link rel="stylesheet" href="__TMPL__Public/css/user.css" />
		<link rel="stylesheet" href="__TMPL__Public/css/public.css" />
		<link rel="stylesheet" href="__TMPL__Public/css/collect.css" />
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Cart/css/flow.css" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc_moblie/newMobile/List/css/group_buy.css" />
		<script type="text/javascript" src="__TMPL__Public/js/jquery.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/jquery.json.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/transport.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/common.js"></script>
		
		<script type="application/javascript" src="__TMPL__Public/js/jquery.more.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/mobile/layer.js"></script>
		<link rel="stylesheet" type="text/css" href="/themes/wnsc_moblie/newMobile/Store/template/demo/css/swiper.min.css" />
		<script src="/themes/wnsc_moblie/newMobile/Store/template/demo/js/swiper.jquery.min.js"></script>
		<style type="text/css">
			.show-menu-btn {
				height: 46px;
			}
		</style>
		<style>
			/*===筛选====*/
			.new_header_2 {     position: relative;
				z-index: 8888;
				height: 44px;
				background: #fff;
				border-bottom: 1px solid #dcdcdc;
				padding: 0;
				text-align: -webkit-center; }
			.new_header_2 .back {width: 30px;	height: 32px;	background: #171616;line-height: 32px;color: #fff;padding: 0 12px; display: block;}
			.new_header_2 .back span {  width: 11px; height: 18px; margin-top: 6px; }
			.new_header_2 h2 { width: 100%; height: 44px; line-height: 44px; background: #fff; text-align: left; font-size: 16px; color: #333; font-family: 'Microsoft Yahei'; font-weight: normal; text-indent:35px; }
			#filter_content { padding-bottom: 67px; }
			.filtrate_category { height: 46px; }
			.filtrate_category a{ font-size:16px; color:#333}
			.filtrate_category_a { display: block; height: 45px; line-height: 45px; padding: 0 15px; color: #646464; border-bottom: 1px solid #dcdcdc; background: url(/themes/wnsc_moblie/Public/images/search_sprite.png) right -97px no-repeat #fff; background-size: 25px 193px; }
			.filtrate_category_show { background: url(/themes/wnsc_moblie/Public/images/search_sprite.png) right -51px no-repeat #fff; background-size: 25px 193px; }
			.filtrate_category .filtrate_category_a .up_down { float: right; margin-right: 20px; white-space: nowrap; text-overflow: ellipsis; max-width: 60%; overflow: hidden; font-size:12px; color:#666}
			.filtrate_category .filtrate_category_a .c_yellow { color: #f88b39; height: 45px; }
			.fixed { position: fixed; top: 0; left: 0; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; }

			.filtrate_list { background: #fff; padding: 0 10px; display: none; }
			.filtrate_list .filtrate_list_li_a { font-size:14px; color: #666; display: block; height: 45px; line-height: 45px; border-bottom: 1px solid #dcdcdc; }
			.filtrate_list .on { color: #dd272c; }
			.filtrate_price {height: 45px; line-height: 45px; color:#333;    float: left; background: #fff; font-size:16px;}
			.filtrate_price span{ display:inline-block; font-size:16px; color:333; height: 45px; line-height: 45px; }

			.filtrate_price input { width: 78px; height: 30px; line-height: 24px; padding: 3px 0 3px 2px; border:0px; margin: 0 5px; text-align: center; background-color: #f6f3f3; color:#666; font-size: 14px; border-radius:2px;cursor: auto;}

			.filtrate_price input.foucs { border: 1px solid #f88b39; background-color: #fff;}
			.filtrate_btn {height: 66px; width: 100%; background: #fff; padding-top:10px;left: 0; z-index: 100; }

			.filtrate_btn li { width: 50%; float: left; }

			.filtrate_btn .reset { width:90%; margin:auto;background:#25C6FC; color: #fff; height: 36px; line-height: 36px; text-align: center; display: block; margin-right: 5px;-webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; font-size:14px; }
			.filtrate_btn .submit { width:90%; margin:auto; background: #dd272c; color: #fff; height: 36px; line-height: 36px; text-align: center; display: block; border: none;-webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px;}

			.filtrate_address { background-color: #fff; padding: 10px 0 5px 10px;}
			.filtrate_address li { padding: 1px; background-color: #f5f5f5; float: left; text-align: center; margin: 0 7px 5px 0; height:40px; line-height:40px; padding: 1px 15px; overflow: hidden; -webkit-border-radius:3px; -moz-border-radius:3px; border-radius:3px;  }
			.filtrate_address li a{ color:#666}
			.filtrate_address li.on {background-color: #dd2726; color: #fff; padding: 1; }
			.filtrate_address li.on a{ color:#FFF}
			.filtrate_has { padding-left: 15px;padding-bottom: 10px;  overflow:hidden; background:#FFF;border-bottom: 1px solid #dcdcdc; }
			.filtrate_has h2 { font-weight: normal; font-size: 16px; line-height: 40px; color:#333 }
			.filtrate_has ul li {  float: left;  width: 50%;}
			.filtrate_has ul li input{ display:none}
			.filtrate_has ul li label { padding-left: 22px; display: block; height: 35px; line-height: 35px; background: url(../images/select2.png) 0 10px no-repeat; background-size: 15px 87px; color: #666; font-size:14px; }
			.filtrate_has ul li.on label { background-position: 0 -34px; }

			.filtrate_has1 { padding-left: 10px;padding-bottom: 10px; background:#FFF;}
			.filtrate_has1 h2 { font-weight: normal; font-size: 16px; line-height: 40px; }
			.filtrate_has1 ul li {  float: left;  width: 50%;}
			.filtrate_has1 ul li input{ display:none}
			.filtrate_has1 ul li label { padding-left: 22px; display: block; height: 35px; line-height: 35px; background: url(../images/select2.png) 0 10px no-repeat; background-size: 15px 87px; color: #989da2; font-size:14px; }
			.filtrate_has1 ul li.on label { background-position: 0 -33px; }

			.filtrate_term { width: 100%; overflow: hidden; background: #fff; border-bottom:1px solid #ccc;}
			.filtrate_term ul { width: 100%; overflow:hidden; }
			.filtrate_term li {width: 25%; height:40px; line-height:40px; text-align: center; float:left; }
			.filtrate_term li a { color:#666; font-size:16px; }
			.filtrate_term li.on a { color: #e3091a; }

			.filtrate_term .arrow_up, .filtrate_term .arrow_down { width: 0px; height: 0px; font-size: 0; line-height: 0; border-color: #fff #fff #a5a5a5 #fff; border-width: 0px 5px 5px; display: inline-block; border-style: solid; position: relative; top: -6px; left: 5px; }
			.filtrate_term .arrow_down { border-color: #a5a5a5 #fff #fff #fff; border-width: 5px 5px 0px; position: relative; top: 2px; left: -5px; }
			.filtrate_term .active_up { border-color: #fff #fff #e3091a #fff; }
			.filtrate_term .active_down { border-color: #e3091a #fff #fff #fff; }

			.swiper-container-horizontal .swiper-pagination-bullets {
				bottom: -5px!important;
				left: 0;
				width: 100%;
			}
			.group-list-box {
				margin-top: 1px;
			}

		</style>
	</head>

	<body style="background:#f3f5f7;">
	<?php
					$agent = $_SERVER['HTTP_USER_AGENT'];
					if(strpos($agent,"Html5Plus") === false){
				?>
		<div class="tab_nav">
			<div class="header" style=" position:relative">
				<div class="h-left">
					<a class="sb-back" href="javascript:history.back(-1)" title="返回"></a>
				</div>
				<div class="h-mid"> 热门团购 </div>
				<aside class="show-menu-btn">
					<div id="show_more" class="show-menu">
						<a href="javascript:;"></a>
					</div>
				</aside>
			</div>

		</div>
		<mtc_include file="Public:right_nav" />
	<?php
					}
				?>

		<?php 
            $group_banner=sp_getslide(6);
        ?>
		<div class="swiper-container">
			<div class="swiper-wrapper">
				<foreach name="group_banner" item="v" key="k">
					<div class="swiper-slide">
						<a href="{$v.ad_link}">
							<img src="{$v.UpFilePathInfo}">
						</a>
					</div>
				</foreach>
				
				

			</div>

			<div class="swiper-pagination"></div>

		</div>
		<script>
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				autoplay: 3000,
				autoplayDisableOnInteraction: false
			});
		</script>
		<div  style="opacity: 1;">
				<div class="product single_item "></div>
		</div>
	<section class="filtrate_term" id="product_sort" style="width: 100%; z-index:9999; border-bottom:1px solid #CCC;margin-top: 10px;">
		<ul>
			<php>
				$orders=I('get.order',0);
				$type=I('get.type',0);
			</php>
			<li <eq name="orders" value="0">class="on"</eq>>
			<a href="{:U('list/group_buy',array('type'=>$_GET['type'],'order'=>0))}">最新</a>
			</li>
			<li <eq name="orders" value="1">class="on"</eq>>
			<a href="{:U('list/group_buy',array('type'=>$_GET['type'],'order'=>1))}">销量</a>
			</li>
			<li <eq name="orders" value="3">class="on"</eq> <eq name="orders" value="4">class="on"</eq>>
			<php>
				if($orders==3){
			</php>
			<a href="{:U('list/group_buy',array('type'=>$_GET['type'],'order'=>4))}">价格<span class="arrow_up "></span><span class="arrow_down  <eq name='orders' value='3'>active_down</eq>"></span></a>
			<php>}else{</php>

			<a href="{:U('list/group_buy',array('type'=>$_GET['type'],'order'=>3))}">价格<span class="arrow_up <eq name='orders' value='4'>active_up</eq>"></span><span class="arrow_down"></span></a>
			<php>}</php>

			</li>
			<li>
				<a class="menu filtrate" name="list_go_filter" style=" color:#666;font-size: 16px;">筛选</a>
			</li>


		</ul>
	</section>
	<section class="_next" style="position: fixed;z-index: 999999;top: 0;width: 100%;background: #fff;height: 100%;display: none;">

		<section id="filter_content">

			<ul class="clearfix filtrate_address filtrate_list att_item" id="brands" style="display: block; -webkit-transform-origin: 0px 0px 0px; opacity: 1; -webkit-transform: scale(1, 1);">

				<li id="brand_0"  <eq name="type" value="0">class="on"</eq>>
				<a href="{:U('list/group_buy',array('type'=>0,'order'=>$orders))}">全部</a>
				</li>
				<foreach name="rs" item="v">
					<li id="brand_0" <eq name="type" value="$v['id']">class="on"</eq>>
					<a href="{:U('list/group_buy',array('type'=>$v['id'],'order'=>$orders))}">{$v.name}</a>
					</li>
				</foreach>
			</ul>
		</section>
		<header>
			<div class="new_header_2" id="filter_header">
				<a href="javascript:;" class="back" id="list_filter_back"><span>返回</span></a>
			</div>
		</header>
		<script>
            $('.filtrate_has li').click(function() {
                $(this).find("input").attr("checked", "checked");
                $('.filtrate_has li').removeClass("on");
                $(this).addClass("on");
            })
		</script>
		<script>
            $('.filtrate_has1 li').click(function() {
                if($(this).hasClass("on")) {
                    $(this).find("input").attr("checked", "");
                    $(this).removeClass("on");
                } else {
                    $(this).find("input").attr("checked", "checked");
                    $(this).addClass("on");
                }

            })
            $('.menu').click(function() {
                $('._next').show();
            })
            $('#list_filter_back').click(function() {
                $('._next').hide();
            })


		</script>
	</section>
		<div class="group-list-box" id="J_ItemList">

			<ul class="group-list tablelist-append product single_item info">
				</ul>
			<a href="javascript:;" class="get_more"></a>
			<!-- 分页 -->
		</div>
		
		<script type="text/javascript">
				var url = "{:U('list/ajax_group',array('type'=>$type,'order'=>$orders))}";
				$(function() {
					$('#J_ItemList').more({
						'address': url
					});
					updateEndTime();
				});
				//倒计时函数
				function updateEndTime() {
					var date = new Date();
					var time = date.getTime(); //当前时间距1970年1月1日之间的毫秒数
			
					$(".settime").each(function(i) {
			
						var endDate = this.getAttribute("endTime"); //结束时间字符串
						//转换为时间日期类型
						var endDate1 = eval('new Date(' + endDate.replace(/\d+(?=-[^-]+$)/, function(a) {
							return parseInt(a, 10) - 1;
						}).match(/\d+/g) + ')');
			
						var endTime = endDate1.getTime(); //结束时间毫秒数
			
						var lag = (endTime - time) / 1000; //当前时间和结束时间之间的秒数
			
						if (lag > 0) {
							var second = Math.floor(lag % 60);
							var minite = Math.floor((lag / 60) % 60);
							var hour = Math.floor((lag / 3600) % 24);
							var day = Math.floor((lag / 3600) / 24);
							$(this).html("剩余" + day + "天" + hour + "时" + minite + "分" + second + "秒");
						} else
							$(this).html("团购已经结束啦！");
					});
					setTimeout("updateEndTime()", 1000);
				}
			</script>
		<mtc_include file="Public:footer" />
	</body>

</html>